<!-- Copyright Epic Games, Inc. All Rights Reserved. -->
<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="js/webRtcPlayer.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript">
      function callbackMsg(data) {
        alert(data);
      }
      function test() {
        var option = {
          type: 'road', //（1）none：停止画刷；（2）marker：标注；（3）tree：树；（4）road：路；（5）water：水面；（6）grass：草地（7）dig：剖挖面（8）distance：距离量测（9）area：面积量测
          param: {
            model: 'RoadDoubleStreet02', // （1）none：默认路面；（2）roadOneStreet：单行街道；（3）roadMulStreet：多行街道；（4）RoadDoubleStreet01  双行街道01；（5）RoadDoubleStreet02  双行街道02；
            layerID: (Math.random() * 1000).toString(),
          },
        };
        var des = {
          funcName: 'setBrushEditingType',
          params: JSON.stringify(option),
        };
        emitUIInteraction(des);
      }

      function testcallback() {
        addResponseEventListener('testcallback123', callbackMsg);

        // var option = {
        // }
        var des = {
          funcName: 'getHardwareInfo',
          // params: JSON.stringify(option)
        };
        emitUIInteraction(des);
      }

      window.onload = function () {
        connect();
      };
    </script>
  </head>

  <body onload="load()">
    <iframe src="http://127.0.0.1" frameborder="0" style="width: 100%; height: 800px"></iframe>
    <div id="playerUI">
      <div id="player">
        <input type="button" onclick="test()" value="测试" />
        <input type="button" onclick="testcallback()" value="测试回调" />
      </div>
    </div>
  </body>
</html>
